import { request } from "@/utils/request"

const prefix = '/parkingType'

/**
 * 获取所有车位类型
 * @returns 
 */
export const getParkingTypeRequest = () => {
	return request.get(`${prefix}/getParkingType`)
}

interface addParkingTypeParams {
	startNum: number,
	hourNum: number,
	monthNum: number,
	dayNum: number,
	notes: string,
	id?: number
}
/**
 * 添加车位类型
 * @param params 
 * @returns 
 */
export const addParkingTypeRequest = (params: addParkingTypeParams) => {
	return request.post(`${prefix}/addParkingType`, params)
}

/**
 * 修改车位类型
 * @param params 
 * @returns 
 */
export const reviseParkingTypeRequest = (params: addParkingTypeParams) => {
	return request.put(`${prefix}/reviseParkingType`, params)
}